package com.aaa.sso.service;

import com.aaa.common.bo.TreeNode;
import com.aaa.common.bo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: YuXin
 * @Date : Created in 2020/11/12 17:12
 * @ClassName : RemoteUserService
 * @Description :
 * @Package_Name : com.aaa.sso.service
 */
@FeignClient("powerService")
public interface RemoteUserService {

    /**
     * 根据用户名密码查询用户信息
     * 远程调用需要加上 @RequestParam
     *
     * @param userName
     */
    @GetMapping("/user/queryUserByParam")
    User queryUserByParam(@RequestParam("userName") String userName);

    /**
     * 通过角色id查询其所有menu
     *
     * @param token
     * @return Result
     */
    @GetMapping("/menu/selectMenuTreeByToken")
    List<TreeNode> selectMenuTreeByToken(@RequestParam("token") String token);

}
